Integrand size = 25, antiderivative size = 177 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=-\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f}-\frac {\sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |-\frac {b}{a}\right .\right ) \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}+\frac {\sqrt {\cos ^2(e+f x)} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),-\frac {b}{a}\right ) \sec (e+f x) \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}{f \sqrt {a+b \sin ^2(e+f x)}} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {3267, 491, 12, 507, 437, 435, 432, 430} \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\frac {\sqrt {\cos ^2(e+f x)} \sec (e+f x) \sqrt {\frac {b \sin ^2(e+f x)}{a}+1} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),-\frac {b}{a}\right )}{f \sqrt {a+b \sin ^2(e+f x)}}-\frac {\sqrt {\cos ^2(e+f x)} \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |-\frac {b}{a}\right .\right )}{a f \sqrt {\frac {b \sin ^2(e+f x)}{a}+1}}-\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f} \]
[In]
[Out]
Rule 12
Rule 430
Rule 432
Rule 435
Rule 437
Rule 491
Rule 507
Rule 3267
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {\cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {1}{x^2 \sqrt {1-x^2} \sqrt {a+b x^2}} \, dx,x,\sin (e+f x)\right )}{f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {b x^2}{\sqrt {1-x^2} \sqrt {a+b x^2}} \, dx,x,\sin (e+f x)\right )}{a f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f}-\frac {\left (b \sqrt {\cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {x^2}{\sqrt {1-x^2} \sqrt {a+b x^2}} \, dx,x,\sin (e+f x)\right )}{a f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f}+\frac {\left (\sqrt {\cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {a+b x^2}} \, dx,x,\sin (e+f x)\right )}{f}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sec (e+f x)\right ) \text {Subst}\left (\int \frac {\sqrt {a+b x^2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{a f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {b x^2}{a}}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{a f \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}+\frac {\left (\sqrt {\cos ^2(e+f x)} \sec (e+f x) \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+\frac {b x^2}{a}}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {a+b \sin ^2(e+f x)}} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f}-\frac {\sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |-\frac {b}{a}\right .\right ) \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{a f \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}+\frac {\sqrt {\cos ^2(e+f x)} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),-\frac {b}{a}\right ) \sec (e+f x) \sqrt {1+\frac {b \sin ^2(e+f x)}{a}}}{f \sqrt {a+b \sin ^2(e+f x)}} \\ \end{align*}
Time = 0.52 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.78 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\frac {-\sqrt {2} (2 a+b-b \cos (2 (e+f x))) \cot (e+f x)-2 a \sqrt {\frac {2 a+b-b \cos (2 (e+f x))}{a}} E\left (e+f x\left |-\frac {b}{a}\right .\right )+2 a \sqrt {\frac {2 a+b-b \cos (2 (e+f x))}{a}} \operatorname {EllipticF}\left (e+f x,-\frac {b}{a}\right )}{2 a f \sqrt {2 a+b-b \cos (2 (e+f x))}} \]
[In]
[Out]
Time = 1.15 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.79
method | result | size |
default | \(\frac {b \left (\cos ^{4}\left (f x +e \right )\right )+\left (-a -b \right ) \left (\cos ^{2}\left (f x +e \right )\right )+\sin \left (f x +e \right ) \sqrt {-\frac {b \left (\cos ^{2}\left (f x +e \right )\right )}{a}+\frac {a +b}{a}}\, \sqrt {\frac {\cos \left (2 f x +2 e \right )}{2}+\frac {1}{2}}\, a \left (F\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right )-E\left (\sin \left (f x +e \right ), \sqrt {-\frac {b}{a}}\right )\right )}{a \sin \left (f x +e \right ) \cos \left (f x +e \right ) \sqrt {a +b \left (\sin ^{2}\left (f x +e \right )\right )}\, f}\) | \(140\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 643, normalized size of antiderivative = 3.63 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=-\frac {-4 i \, \sqrt {-b} b \sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} \sqrt {\frac {a^{2} + a b}{b^{2}}} F(\arcsin \left (\sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} {\left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {8 \, a^{2} + 8 \, a b + b^{2} - 4 \, {\left (2 \, a b + b^{2}\right )} \sqrt {\frac {a^{2} + a b}{b^{2}}}}{b^{2}}) \sin \left (f x + e\right ) + 4 i \, \sqrt {-b} b \sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} \sqrt {\frac {a^{2} + a b}{b^{2}}} F(\arcsin \left (\sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} {\left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {8 \, a^{2} + 8 \, a b + b^{2} - 4 \, {\left (2 \, a b + b^{2}\right )} \sqrt {\frac {a^{2} + a b}{b^{2}}}}{b^{2}}) \sin \left (f x + e\right ) + 2 \, \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} b \cos \left (f x + e\right ) + {\left (2 i \, \sqrt {-b} b \sqrt {\frac {a^{2} + a b}{b^{2}}} \sin \left (f x + e\right ) + {\left (2 i \, a + i \, b\right )} \sqrt {-b} \sin \left (f x + e\right )\right )} \sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} E(\arcsin \left (\sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} {\left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {8 \, a^{2} + 8 \, a b + b^{2} - 4 \, {\left (2 \, a b + b^{2}\right )} \sqrt {\frac {a^{2} + a b}{b^{2}}}}{b^{2}}) + {\left (-2 i \, \sqrt {-b} b \sqrt {\frac {a^{2} + a b}{b^{2}}} \sin \left (f x + e\right ) + {\left (-2 i \, a - i \, b\right )} \sqrt {-b} \sin \left (f x + e\right )\right )} \sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} E(\arcsin \left (\sqrt {\frac {2 \, b \sqrt {\frac {a^{2} + a b}{b^{2}}} + 2 \, a + b}{b}} {\left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {8 \, a^{2} + 8 \, a b + b^{2} - 4 \, {\left (2 \, a b + b^{2}\right )} \sqrt {\frac {a^{2} + a b}{b^{2}}}}{b^{2}})}{2 \, a b f \sin \left (f x + e\right )} \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int \frac {\csc ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sin ^{2}{\left (e + f x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sin \left (f x + e\right )^{2} + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sin \left (f x + e\right )^{2} + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin ^2(e+f x)}} \, dx=\int \frac {1}{{\sin \left (e+f\,x\right )}^2\,\sqrt {b\,{\sin \left (e+f\,x\right )}^2+a}} \,d x \]
[In]
[Out]